<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/min_header}

    <div class="betTitle fix">
      <div class="betLogo">
        <h2>{$info['title']}</h2>
        <i class="iconfont L_K3"></i>
      </div>
      <div class="time">
        <div class="timeTitle">
          距<b id="qh">{$k3info['period']}</b>期投注截止还有：
        </div>
        <em id="timer">00:00:00</em>
      </div>
      <input type="hidden" id="lottery_id" value="{$info['id']}" />
      <input type="hidden" id="perK3LastCode" value="{$prek3info['code']}"/>
      <input type="hidden" id="servicesTime" value="{$nowTime}"/>
      <script type="text/javascript" src="static/js/jquery.downCount.js"></script>
      <script type="text/javascript">
      	var k3InfoStopTime = "{$k3info['stoptime']}";
      	if (!$.isEmptyObject(k3InfoStopTime)){
      		var newdate = '{date('m/d/Y H:i:s',$k3info['stoptime'])}';
            $('#timer').downCount({
            	startTime: '{$nowTime}',
                date: newdate,
                offset: +8
            }, function () {
                var newperiod = {$k3info['period']} + 1;        
                $('#qh').html(newperiod);
                    layer.open({
                        title: '温馨提示',
                        　　　　	content: '{$k3info['period']}期已截止<br />当前期号'+newperiod+'<br />投注时请注意期号',//提示信息
                        　　　　	type: 0,
                        　　　　	fix: false, //不固定
                        　　　　	scrollbar: false,//滚动条
                        yes:function(){ // 点击确定按钮
    						location.reload();
                        　　　　	},
                        　　　　	// end 函数执行的是弹框关闭时触发的事件 
                        　　　　	end:function(index){ // 未点击确定按钮，点击关闭按钮  
                      　　			location.reload(); 
                        }
                        　　});
                return;
            });
            var lastCode = $('#perK3LastCode').val();
            if(lastCode){
              setTimeout(function(){
                $("#Results ul").eq(0).hide();
                $("#Results ul").eq(1).find('li').map(function(i, eme){
                  $(eme).attr('class',"announcedNo"+lastCode.split(',')[i]);
                });
              },2000)
            }
        }else{
            $('.timeTitle').html('');
            $('#timer').html('暂未销售');
        }
        
      </script>
      <div id="Results" class="announced">
        <div class="announcedTitle">
          <!-- 第<b>{$k3last['period']}</b>期开奖号码： -->
          第<b>{$prek3info['period']}</b>期开奖号码：
        </div>

        <ul class="announcedNo fix" style="margin-top:5px;">
          <img src="//imagess-google.com/system/pc/k3/open_num.gif" width="61" height="71"><img src="//imagess-google.com/system/pc/k3/open_num.gif" width="61" height="71"><img src="//imagess-google.com/system/pc/k3/open_num.gif" width="61" height="71">
        </ul>
        <ul class="announcedNo fix">
          <li class="announcedNo2"></li>
          <li class="announcedNo4"></li>
          <li class="announcedNo6"></li>
        </ul>
        <ul class="announcedNo announcedNoText fix">
          <li class="announcedNo2">2</li>
          <li class="announcedNo4">4</li>
          <li class="announcedNo6">6</li>
        </ul>
      </div>
    </div>
    <div class="betContent fix">
      <div class="betLeft">
        <div>
          <div class="betNavCon">
            <ul class="betNav fix" style="width: 1250px; transform: translateX(0px);" id="id_lottNav">
              {loop $k3 as $r}
                <a href="index.php?m=index&c=k3&id={$r['id']}"><li class="{if $info['ename'] == $r['ename']}active{/if}" ami="{$r['id']}">{$r['title']}</li></a>
              {/loop}
              
            </ul>
          </div>
          <a class="betNavtab left"><span><em></em></span></a>
          <a class="betNavtab right"><span><em></em></span></a>
        </div>

        <div>
          <ul class="betFilter tag_k3_play_type" id="lottery">
            <li class="layui-this" ami="HZ">和值</li>
            <li ami="STHTX">三同号通选</li>
            <li ami="STHDX">三同号单选</li>
            <li ami="SBTH">三不同号</li>
            <li ami="SLHTX">三连号通选</li>
            <li ami="ETHFX">二同号复选</li>
            <li ami="ETHDX">二同号单选</li>
            <li ami="EBTH">二不同号</li>
          </ul>
          <div class="betTip" id="id_play_tips">
            <i class="iconfont"></i>猜3个开奖号相加的和，3-10为小，11-18为大。赔率<font class="tag_pc_bonus">1.95-189.00</font>倍。
          </div>
          <div id="lotteryc">
              <div class="lotteryshow layui-tab-item layui-show">
                  <div class="checkNumber">
                      <ul>
                          {loop $list['he'] as $r}
                          <li><a href="javascript:void(0);"  class="ClickShade he" data-id="{$r['val']}">{$r['val']}</a><span class="tag_with_odds" ami="{$r['val']}"> 赔{$r['bl']}</span></li>
                          {/loop}
                      </ul>
                  </div>
              </div>
              <div class="lotteryshow layui-tab-item">
                  <div class="checkNumber">
                      <ul>
                          {loop $list['sth'] as $r}
                            <li><a href="javascript:void(0);"  class="ClickShade sth" data-id="{$r['val']}">{$r['val']}</a></li>
                          {/loop}
                      </ul>
                  </div>
              </div>
              <div class="lotteryshow layui-tab-item">
                  <div class="checkNumber">
                      <ul>
                          <li><a href="javascript:void(0);"  class="ClickShade sthdx" data-id="sthdx">111</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sthdx" data-id="sthdx">222</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sthdx" data-id="sthdx">333</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sthdx" data-id="sthdx">444</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sthdx" data-id="sthdx">555</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sthdx" data-id="sthdx">666</a></li>
                      </ul>
                  </div>
                  <div class="Panel sthdxs">
                      <p class="betTotal">您选择了 <em>0</em> 注</p>
                      <a href="javascript:void(0);"  class="betBtn ClickShade" id="sthdx">确认选号</a>
                  </div>
              </div>
              <div class="lotteryshow layui-tab-item">
                  <div class="checkNumber">
                      <ul>
                          <li><a href="javascript:void(0);"  class="ClickShade sbth">1</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sbth">2</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sbth">3</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sbth">4</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sbth">5</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade sbth">6</a></li>
                      </ul>
                  </div>
                  <div class="Panel" id="sbth">
                      <p class="betTotal">您选择了 <em>0</em> 注</p>
                      <a href="javascript:void(0);"  class="betBtn ClickShade">确认选号</a>
                  </div>
              </div>
              <div class="lotteryshow layui-tab-item">
                  <div class="checkNumber">
                      <ul>
                          {loop $list['slhtx'] as $r}
                          <li><a href="javascript:void(0);"  class="ClickShade slhtx" data-id="{$r['val']}">{$r['val']}</a></li>
                          {/loop}
                      </ul>
                  </div>
              </div>
              <div class="lotteryshow layui-tab-item">
                  <div class="checkNumber">
                      <div class="checkNumber">
                          <ul>
                              <li><a href="javascript:void(0);"  class="ClickShade ethfx" data-id="ethfx">11</a></li>
                              <li><a href="javascript:void(0);"  class="ClickShade ethfx" data-id="ethfx">22</a></li>
                              <li><a href="javascript:void(0);"  class="ClickShade ethfx" data-id="ethfx">33</a></li>
                              <li><a href="javascript:void(0);"  class="ClickShade ethfx" data-id="ethfx">44</a></li>
                              <li><a href="javascript:void(0);"  class="ClickShade ethfx" data-id="ethfx">55</a></li>
                              <li><a href="javascript:void(0);"  class="ClickShade ethfx" data-id="ethfx">66</a></li>
                          </ul>
                      </div>
                      <div class="Panel" id="ethfx">
                          <p class="betTotal">您选择了 <em>0</em> 注</p>
                          <a href="javascript:void(0);"  class="betBtn ClickShade">确认选号</a>
                      </div>
                  </div>
              </div>
              <div class="lotteryshow layui-tab-item">
                  <div class="checkNumber">
                      <ul data-type="one">
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">11</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">22</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">33</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">44</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">55</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">66</a></li>
                      </ul>
                      <ul data-type="two">
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">1</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">2</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">3</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">4</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">5</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ethdx">6</a></li>
                      </ul>
                  </div>
                  <div class="Panel" id="ethdx">
                      <p class="betTotal">您选择了 <em>0</em> 注</p>
                      <a href="javascript:void(0);"  class="betBtn ClickShade">确认选号</a>
                  </div>
              </div>
              <div class="lotteryshow layui-tab-item">
                  <div class="checkNumber">
                      <ul>
                          <li><a href="javascript:void(0);"  class="ClickShade ebth" data-id="ebth">1</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ebth" data-id="ebth">2</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ebth" data-id="ebth">3</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ebth" data-id="ebth">4</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ebth" data-id="ebth">5</a></li>
                          <li><a href="javascript:void(0);"  class="ClickShade ebth" data-id="ebth">6</a></li>
                      </ul>
                  </div>
                  <div class="Panel" id="ebth">
                      <p class="betTotal">您选择了 <em>0</em> 注</p>
                      <a href="javascript:void(0);"  class="betBtn ClickShade">确认选号</a>
                  </div>
              </div>
          </div>

          <div class="checkedList">
            <table>
				<tbody>

				</tbody>
            </table>
          </div>
          <div class="Bet" id="BetCount" style="margin:0 15px;">
            <p class="betTotal">
              方案注数 <em>0</em> 注，金额 <i class="money">0</i> 元
            </p>
            <a href="javascript:void(0);" class="betBtn ClickShade UnClick" id="lj">立即投注</a>
          </div>
        </div>
      </div>
      
		{template index/betright}
      
      
    </div>

</div>

<div id="confirm" class="layermbox layermbox0 layermshow" index="20" style="display:none;">
  <div class="laymshade">
  </div>
  <div class="layermmain">
    <div class="section">
      <div class="layermchild layerBet layermanim">
        <h3 style="">投注确认</h3>
        <button class="layermend"></button>
        <div class="layermcont">
          <div id="CheckBetLayer" class="lotteryConfirm">
            <ul>
              <li><span>彩种：</span><em class="fill" id="title">{$info['title']}</em></li>
              <li><span>期号：</span>第<em class="fill">{$k3info['period']}</em>期</li>
              <li><span>详情：</span>
              <div class="fill textarea">
                <p>
                 
                </p>
              </div>
              </li>
              <li><span>投注总金额：</span><em><em class="fill" id="countmoney">0</em>元</em></li>
            </ul>
          </div>
        </div>
        <div class="layermbtn">
          <span type="0" id="qx">取消</span><span id="k3sub" type="1">确认投注</span>
        </div>
      </div>
    </div>
  </div>
</div>

<input type="hidden" id="tid" value="{$k3info['tid']}" />
<input type="hidden" id="period" value="{$k3info['period']}" />
<script type="text/javascript">
    var ct2 = "{U('index/k3/countnum2')}";
    var ct3 = "{U('index/k3/countnum3')}";
    var curl = "{U('index/k3/returnbl')}";
    var choiceIndex = $('#id_lottNav li[class="active"]').attr('ami');
    var orderurl = "{U('index/k3/orderAdd')}";
    var codeKeyList = {$codeKeyList};
</script>
<script src="static/js/k3.js"></script>
{template index/footer}
